Ext.define('Fxt.id-card.view.Grid', {
    extend: 'Fxt.core.view.Grid',
    model: 'Fxt.id-card.Model',
    $selModel: 'MULTI',
    $audit: false,
    $newStore: function() {
        return Ext.create('Fxt.id-card.Store')
    },
    tbar: [{
        text: '新增',
        action: 'add',
        $url: '/id-card/save'
    }, {
        text: '编辑',
        action: 'edit',
        $url: '/id-card/save'
    }],
    columns: [{
        text: '身份证号',
        dataIndex: 'idCardNumber'
    }, {
        text: '真实姓名',
        dataIndex: 'realName'
    }, {
        text: '正面照',
        dataIndex: 'idCardNumber',
        renderer: function (value, row, record) {
            return '<a href="/id-card/view/' + value + '/file1" target="_blank">正面照</a>';
        }
    }, {
        text: '反面照',
        dataIndex: 'idCardNumber',
        renderer: function (value, row, record) {
            return '<a href="/id-card/view/' + value + '/file2" target="_blank">反面照</a>';
        }
    }, {
        text: '手持照',
        dataIndex: 'idCardNumber',
        renderer: function (value, row, record) {
            return '<a href="/id-card/view/' + value + '/file3" target="_blank">手持照</a>';
        }
    }, {
        text: '创建时间',
        dataIndex: 'insertTime',
        renderer: Ext.util.Format.dateRenderer('Y-m-d H:i:s')
    }]
});